﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace Infrastructure.WpfClient.Composite.Regions.ModalWindow
{
    [AttributeUsage(AttributeTargets.Class)]
    public class ModalWindowsInfoAttribute : Attribute
    {
        public double? Height;
        public double? Width;
        public int HeightPer { get; protected set; }
        public int WidthPer { get; protected set; }
        public ResizeMode WindowResizeMode;
        public WindowStartupLocation StartupLocation;
        public WindowState State;
        public SizeToContent SizeToContent;
        public WindowStyle WindowStyle;
        public bool ScapeIsExit;
        public ModalWindowsInfoAttribute()
        {

        }

        public ModalWindowsInfoAttribute(SizeToContent sizetocontent)
            : this(ResizeMode.CanResize, WindowStartupLocation.CenterScreen, WindowState.Normal, sizetocontent, WindowStyle.SingleBorderWindow) { }


        public ModalWindowsInfoAttribute(ResizeMode resizemode, SizeToContent sizetocontent, bool ScapeIsExit)
            : this(null, null, resizemode, WindowStartupLocation.CenterScreen, WindowState.Normal, sizetocontent, WindowStyle.SingleBorderWindow, ScapeIsExit)
        { }
        public ModalWindowsInfoAttribute(ResizeMode resizemode)
            : this(resizemode, WindowStartupLocation.CenterScreen, WindowState.Normal, SizeToContent.WidthAndHeight, WindowStyle.SingleBorderWindow) { }
        public ModalWindowsInfoAttribute(ResizeMode resizemode, double Width, double height)
            : this(height, Width, resizemode, WindowStartupLocation.CenterScreen, WindowState.Normal, SizeToContent.Manual, WindowStyle.SingleBorderWindow) { }
        public ModalWindowsInfoAttribute(ResizeMode resizemode, double Width, double height, bool scapeIsExit)
            : this(height, Width, resizemode, WindowStartupLocation.CenterScreen, WindowState.Normal, SizeToContent.Manual, WindowStyle.SingleBorderWindow, scapeIsExit) { }
        public ModalWindowsInfoAttribute(ResizeMode resizemode, int WidthPer, int heightPer)
            : this(System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Height * heightPer / 100, System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width * WidthPer / 100, resizemode, WindowStartupLocation.CenterScreen, WindowState.Normal, SizeToContent.Manual, WindowStyle.SingleBorderWindow) { }
        public ModalWindowsInfoAttribute(ResizeMode resizemode, int WidthPer, int heightPer, bool scapeIsExit)
            : this(System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Height * heightPer / 100, System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width * WidthPer / 100, resizemode, WindowStartupLocation.CenterScreen, WindowState.Normal, SizeToContent.Manual, WindowStyle.SingleBorderWindow, scapeIsExit) { }

        public ModalWindowsInfoAttribute(
            ResizeMode resizemode,
            WindowStartupLocation startuplocation,
            WindowState state,
            SizeToContent sizetocontent,
            WindowStyle windowstyle)
            : this(null, null, resizemode, startuplocation, state, sizetocontent, windowstyle, false)
        {

        }
        public ModalWindowsInfoAttribute(
            double? height,
            double? width,
            ResizeMode resizemode,
            WindowStartupLocation startuplocation,
            WindowState state,
            SizeToContent sizetocontent,
            WindowStyle windowstyle)
            : this(height, width, resizemode, startuplocation, state, sizetocontent, windowstyle, false)
        {

        }

        public ModalWindowsInfoAttribute(
            double? height,
            double? width,
            ResizeMode resizemode,
            WindowStartupLocation startuplocation,
            WindowState state,
            SizeToContent sizetocontent,
            WindowStyle windowstyle,
            bool ScapeIsExit)
        {
            this.WindowResizeMode = resizemode;
            this.Height = height;
            this.Width = width;
            this.StartupLocation = startuplocation;
            this.State = state;
            this.SizeToContent = sizetocontent;
            this.WindowStyle = windowstyle;
            this.ScapeIsExit = ScapeIsExit;
        }


    }
}
